﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RaytracerLib;
using System.ComponentModel;
using RaytracerLib.Samplers;
using RaytracerLib.Resamplers;
using RaytracerLib.Postprocessing.LightCorrector;
using RaytracerLib.Renderers;

namespace Raytracer.PropertyGridDecorators
{
    public class RendererProperties
    {
        private Renderer m_renderer;

        public RendererProperties(Renderer a_renderer)
        {
            m_renderer = a_renderer;
        }
    }

    public class SamplesVisualizerRendererProperties : RendererProperties
    {
        private SamplesVisualizerRenderer m_samples_visualizer_renderer;

        public SamplesVisualizerRendererProperties(SamplesVisualizerRenderer a_samples_visualizer_renderer)
            : base(a_samples_visualizer_renderer)
        {
            m_samples_visualizer_renderer = a_samples_visualizer_renderer;
        }

        public int Scale
        {
            get
            {
                return m_samples_visualizer_renderer.Scale;
            }
            set
            {
                m_samples_visualizer_renderer.Scale = value;
            }
        }
    }

    public class SamplesPeriodogramRendererProperties : RendererProperties
    {
        private SamplesPeriodogramRenderer m_samples_periodiogram_renderer;

        public SamplesPeriodogramRendererProperties(SamplesPeriodogramRenderer a_samples_periodiogram_renderer)
            : base(a_samples_periodiogram_renderer)
        {
            m_samples_periodiogram_renderer = a_samples_periodiogram_renderer;
        }

        [DisplayName("Scale values")]
        [TypeConverter(typeof(DoubleConverter))]
        public double ScaleValues
        {
            get
            {
                return m_samples_periodiogram_renderer.ScaleValues;
            }
            set
            {
                m_samples_periodiogram_renderer.ScaleValues = value;
            }
        }

        [DisplayName("Scale samples")]
        public int ScaleSamples
        {
            get
            {
                return m_samples_periodiogram_renderer.ScaleSamples;
            }
            set
            {
                m_samples_periodiogram_renderer.ScaleSamples = value;
            }
        }

        public int Repeats
        {
            get
            {
                return m_samples_periodiogram_renderer.Repeats;
            }
            set
            {
                m_samples_periodiogram_renderer.Repeats = value;
            }
        }
    }
}
